<?php

   function runtimelog( $msg)
   { 
   // open file
   $url=$_SERVER["REQUEST_URI"];
   
   $msg="[".$url."]:".$msg;
   $filename="../runtime.log";
   $fd = fopen($filename, "a");
   // append date/time to message
   $str = "[" . date("Y/m/d h:i:s", mktime()) . "] " . $msg; 
   // write string
   fwrite($fd, $str . "\n");
   // close file
   fclose($fd);
   }
   function runtimeerror( $msg)
   {
   // open file
   $url=$_SERVER["REQUEST_URI"];
   
   $filename="../runtime_error.log";
   $fd = fopen($filename, "a");
   // append date/time to message
   $str = "[" . date("Y/m/d h:i:s", mktime()) . "] " . $msg; 
   // write string
   fwrite($fd, $str . "\n");
   // close file
   fclose($fd);
   }
?>